package toString;


class Fruit{
	private String name;
	public Fruit(String name) {
		this.name = name;
	}
	/*public void setName(String name) {
		this.name = name;
	}*/

	public boolean equals(Object obj) {
		if (obj instanceof Fruit){
		Fruit other = (Fruit) obj;
			if (name == null) {
				if (other.name != null)
					return false;
			} else if (!name.equalsIgnoreCase(other.name))
				return false;
		}
		return true;
	}
}

public class Main {
	
	public static void main(String[] args) {
		Fruit f1 = new Fruit("Banana");
		Fruit f2 = new Fruit("banana");
		System.out.println(f1.equals(f2));
	}
}